package com.king.controller;


import com.king.common.lang.Result;
import com.king.service.LogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author KING
 * @since 2020-08-16
 */
@RestController
@RequestMapping("/log")
public class LogController {

    @Autowired
    LogService logService;

    /**
     * 通过?传递参数
     * /log/getLogById?id=1
     * @param id
     * @return
     */
    @GetMapping("/getLogById")
    public Result getLogs(Long id){
        return Result.success(logService.getById(id));
    }
}
